﻿using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 纸片人.win2dEffectControl.DataClass
{
    internal class TemperatureAndTintEffectData : EffectOneSourceData
    {


        private float tint=0;
        private float temperature=0;


        public float Temperature { get => temperature; set { temperature = value; OnPropertyChanged(); SetIsChanges(); } }
        public float Tint { get => tint; set { tint = value; OnPropertyChanged(); SetIsChanges(); } }
        #region 属性

        #endregion
        public override ICanvasImage GetEffect(CanvasDevice device, bool compression)
        {
            var source = GetSourceEffect(device, compression);
            if (source == null)
                return null;
 
            var effect = new TemperatureAndTintEffect()
            {
                Source = source,
                Temperature = Temperature,
                Tint = Tint,

            };



            return effect;
        }


    }
}